<a href='https://github.com/angular/angular.js/edit/v1.4.x/src/ng/anchorScroll.js?message=docs($anchorScrollProvider)%3A%20describe%20your%20change...#L3' class='improve-docs btn btn-primary'><i class="glyphicon glyphicon-edit">&nbsp;</i>Improve this Doc</a>



<a href='https://github.com/angular/angular.js/tree/v1.4.7/src/ng/anchorScroll.js#L3' class='view-source pull-right btn btn-primary'>
  <i class="glyphicon glyphicon-zoom-in">&nbsp;</i>View Source
</a>


<header class="api-profile-header">
  <h1 class="api-profile-header-heading">$anchorScrollProvider</h1>
  <ol class="api-profile-header-structure naked-list step-list">
    
  <li>
    <a href="api/ng/service/$anchorScroll">- $anchorScroll</a>
  </li>

    <li>
      - provider in module <a href="api/ng">ng</a>
    </li>
  </ol>
</header>



<div class="api-profile-description">
  <p>Use <code>$anchorScrollProvider</code> to disable automatic scrolling whenever
<a href="api/ng/service/$location#hash">$location.hash()</a> changes.</p>

</div>




<div>
  

    

  

  
<h2>Methods</h2>
<ul class="methods">
  <li id="disableAutoScrolling">
    <h3><p><code>disableAutoScrolling();</code></p>

</h3>
    <div><p>By default, <a href="api/ng/service/$anchorScroll">$anchorScroll()</a> will automatically detect changes to
<a href="api/ng/service/$location#hash">$location.hash()</a> and scroll to the element matching the new hash.<br />
Use this method to disable automatic scrolling.</p>
<p>If automatic scrolling is disabled, one must explicitly call
<a href="api/ng/service/$anchorScroll">$anchorScroll()</a> in order to scroll to the element related to the
current hash.</p>
</div>

    

    
    
    

  </li>
  </ul>
  
  



  
</div>


